/*
 *  This file is part of WWWPal.
 *
 *  Copyright (C) 2003  Dr. John Punin, Department of Computer Science
 *  Rensselaer Polytechnic Institute
 *
 *  WWWPal is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  WWWPal is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Foobar; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

/*
 *  This file is part of WWWPal.
 *
 *  Copyright (C) 2003  Dr. John Punin, Department of Computer Science
 *  Rensselaer Polytechnic Institute
 *
 *  WWWPal is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  WWWPal is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Foobar; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
#ifndef GR_WEBGRAPH_H
#define GR_WEBGRAPH_H

#include "gr_graph.h"
#include "gr_node.h"
#include "gr_edge.h"

int 
classify_edges_by_directory(GraphFrame *gf);
int
chararrcmp(char *s, int n, char *p , int m);
int
gr_partition_url(char *url, int *npos);
void
set_edge_class_by_directory(PEDGE e);

int
num_hyperlinks_out(PNODE v);
int
num_hyperlinks_to_ext(PNODE v);
int
num_hyperlinks_to_nhtml(PNODE v);
int
num_hyperlinks_to_html(PNODE v);

int
is_vertex_num_hyperlinks_lower(PNODE u, PNODE v);
int
is_vertex_num_hyperlinks_bigger(PNODE u,PNODE v);
int
num_ref_objects_out(PNODE v);
int
is_vertex_num_ref_objects_lower(PNODE u, PNODE v);
int
is_vertex_num_ref_objects_bigger(PNODE u,PNODE v);
int 
vertex_http_code(PNODE v);

int 
num_vertices_http_code(GraphFrame *gf, int code);
int
num_html_pages_with_error_http_code(GraphFrame *gf, int code);
int
num_orphan_html_pages(GraphFrame *gf);
int
num_html_pages_without_title(GraphFrame *gf);
int
num_html_pages_with_images_without_alt(GraphFrame *gf);
int
num_objects_http_code(GraphFrame *gf, int code);

void
GR_set_shape_from_attributes(GraphFrame *gf);

#endif

